﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" 
Inherits="Nivdal.FriendsBlackList" Title="" Theme="SkinFile" Codebehind="FriendsBlackList.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="basic_element">
    <div class="red_title">
       <asp:Label ID="BlacklistedUsersLabel" runat="server" CssClass="white_title"
            Text="<%$ Resources:Resource, FriendsBlackList_BlacklistedUsersTitleLabelText %>"></asp:Label>
    </div>
    <div class="padding5">

    <asp:GridView ID="BlacklistGridView" runat="server" AutoGenerateColumns="false" AllowSorting="false"
     AllowPaging="false" DataSourceID="FriendsBlacklistDataSourse" SkinID="Professional" OnRowCommand="DeleteBlacklistEntry">
        <EmptyDataTemplate>
            <asp:Label ID="NoBlacklistedUsersLabel" runat="server" Text="<%$ Resources:Resource, FriendsBlackList_NoBlacklistedUsersLabelText %>"
             SkinID="GridLabel"></asp:Label>
        </EmptyDataTemplate>
        <Columns>
            <asp:TemplateField ItemStyle-Width="80%">
                <ItemTemplate>
                    <asp:Image ID="UserPicture" runat="server" ImageUrl='<%# Eval("UserPicture") %>'
                     ToolTip='<%# Eval("UserName") %>' Width="32" />
                    <asp:HyperLink ID="BlacklistedUserHyperlink" runat="server" Text='<%# Eval("UserName") %>' SkinID="GreenTitleHyperLink"
                     NavigateUrl='<%# "~/UserPage.aspx?UserId" + Eval("UserId") %>' ></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:ImageButton ID="DeleteFromBlacklistImageButton" runat="server" CommandArgument='<%# Eval("SuggestionId") %>'
                     CommandName="Delete" ImageUrl="~/Images/Icons/delete.png" 
                     ToolTip="<%$ Resources:Resource, FriendsBlackList_DeleteBlackListToolTip %>" 
                     OnClientClick='<%# DelteBlacklistOnClientClick() %>'/>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    </div>
    </div>
    <div class="basic_element">
    <div class="red_title">
       <asp:Label ID="DeclinedUsersTitleLabel" runat="server" CssClass="white_title"
    Text="<%$ Resources:Resource, FriendsBlackList_DeclinedUsersTitleLabelText %>"></asp:Label>
    </div>
    <div class="padding5">
        <asp:GridView ID="RecentlyDeclinedGridview" runat="server" AutoGenerateColumns="false" AllowSorting="false"
         AllowPaging="false" DataSourceID="DeclinedFriendsDataSourse" SkinID="Professional" OnRowCommand="DeleteRejectedEntry">
            <Columns>
                <asp:TemplateField ItemStyle-Width="80%">
                    <ItemTemplate>
                        <asp:Image ID="UserPicture" runat="server" ImageUrl='<%# Eval("UserPicture") %>'
                         ToolTip='<%# Eval("UserName") %>' Width="32" />
                        <asp:HyperLink ID="BlacklistedUserHyperlink" runat="server" Text='<%# Eval("UserName") %>' SkinID="GreenTitleHyperLink"
                         NavigateUrl='<%# "~/UserPage.aspx?UserId" + Eval("UserId") %>' ></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:ImageButton ID="DeleteFromBlacklistImageButton" runat="server" CommandArgument='<%# Eval("SuggestionId") %>'
                         CommandName="Delete" ImageUrl="~/Images/Icons/delete.png" 
                         ToolTip="<%$ Resources:Resource, FriendsBlackList_DeleteBlackListToolTip %>"
                         OnClientClick='<%# DelteDeclineOnClientClick() %>' />
                    </ItemTemplate>
                </asp:TemplateField>
            
            </Columns>

        </asp:GridView>
    
        <asp:SqlDataSource ID="FriendsBlacklistDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_FriendshipGetBlackList" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
        <asp:SqlDataSource ID="DeclinedFriendsDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_FriendshipGetListOfDeclinedSuggestions" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
    </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageNamePlaceHolder" Runat="Server">
    <asp:Label ID="PageNameLabel" runat="server" CssClass="PageNameContentStyle" 
    Text="<%$ Resources:Resource, Global_BlackList %>"></asp:Label>
</asp:Content>

